<!DOCTYPE html>
<script type="text/javascript">
	function a(password){
		$.post("superbosswy/jiaoyanpwd",{"pwd":password},function(data){
			if(!data){
				alert("原密码错误，请重新输入")
			}else{
				$('#newpwd').attr('disabled',false)
				$('#newpwd1').attr('disabled',false)
				$('#bc').attr('disabled',false)
			}
		})
	}
	function b(newpwd){
		if(newpwd.length<6){
			alert("密码长度必须大于六位！");
		}
	}
	function c(){
		var newpwd = $('#newpwd').val()
		var newpwd1 = $('#newpwd1').val()
		if(newpwd==null||newpwd==""){
			alert("请先输入您要修改的新密码")
		}
		else{
			if(newpwd!=newpwd1){
				alert("两次输入密码不一致")
			}
		}
	}
	function d(){
		var newpwd = $('#newpwd').val()
		var newpwd1 = $('#newpwd1').val()
		$('#dialog').load('superbosswy/tjmm?newpwd='+newpwd+'&newpwd1='+newpwd1)
	}
</script>

<div style="margin: 250px 600px;">
		<table>
			<tbody>
				<tr style="margin: 50px;">
					<th>原密码：</th>
					<td><input type="password" onchange="a(this.value)"></td>
				</tr>
				<tr style="margin: 50px;">
					<th>新密码：</th>
					<td><input disabled="disabled" name="newpwd" id="newpwd" type="password" onchange="b(this.value)"></td>
				</tr>
				<tr style="margin: 50px;">
					<th>确认新密码：</th>
					<td><input disabled="disabled" name="newpwd1" id="newpwd1" type="password" onchange="c()"></td>
				</tr>
			</tbody>
		</table>
		<tr>
			<button id="bc" disabled="disabled" type="button" onclick="d()">保存</button>
			<button type="reset">重置</button>
		</tr>
</div>
